﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.Unity;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Unity;
using Microsoft.Practices.EnterpriseLibrary.Data.Configuration.Unity;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace Gallery.DAL.Repositories
{
    public class RepositoryFactory
    {
        public static UnityContainer container = new UnityContainer();

        static RepositoryFactory()
        {
            Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>();
        }

        public static T ResolveRepository<T>()
        {
            return container.Resolve<T>();
        }
    }
    
}